Skip to content

[Remote Store] Get SeqNo from Segment Info and integ tests for restore flow#6067

Merged
gbbafna merged 2 commits intoopensearch-project:mainfrom
sachinpkale:remote-store-it
Feb 3, 2023
Merged

[Remote Store] Get SeqNo from Segment Info and integ tests for restore flow#6067
gbbafna merged 2 commits intoopensearch-project:mainfrom
sachinpkale:remote-store-it

Conversation

@sachinpkale
Copy link
Copy Markdown
Member

@sachinpkale sachinpkale commented Jan 30, 2023

Description

  • Add integration tests for remote store restore flow.
  • Few changes discovered as part of integ test runs.

Issues Resolved

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@github-actions
Copy link
Copy Markdown
Contributor

Gradle Check (Jenkins) Run Completed with:

assert indexShard.getEngine() instanceof InternalEngine : "Expected shard with InternalEngine, got: "
+ indexShard.getEngine().getClass();
final long lastRefreshedCheckpoint = ((InternalEngine) indexShard.getEngine()).lastRefreshedCheckpoint();
final long lastRefreshedCheckpoint = indexShard.getEngine().getMaxSeqNoFromSegmentInfos(segmentInfosSnapshot);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should rename lastRefreshedCheckpoint to maxSeqNoFromSegmentIfnos ?

ensureYellowAndNoInitializingShards(INDEX_NAME);
ensureGreen(INDEX_NAME);

Map<String, Long> indexStats = indexData();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how do we sure that remote segment store is up to date here ? Should we check the local fs , in case we don't have any stats.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We trigger explicit refresh/flush which calls RemoteStoreRefreshListener in the same flow. So, if remote store is available, the segments should be uploaded. Test failure means some problem with the code and we need to fix it.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 3, 2023

Gradle Check (Jenkins) Run Completed with:

Sachin Kale added 2 commits February 3, 2023 10:00
Signed-off-by: Sachin Kale <kalsac@amazon.com>
Signed-off-by: Sachin Kale <kalsac@amazon.com>
@sachinpkale
Copy link
Copy Markdown
Member Author

Gradle Check (Jenkins) Run Completed with:

* **RESULT:** FAILURE ❌

* **URL:** https://build.ci.opensearch.org/job/gradle-check/10568/

* **CommitID:** [6888f87](https://github.com/opensearch-project/OpenSearch/commit/6888f87bb146f2ed512e20e5383fa5e0a5cdcd9e)
  Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green.
  Is the failure [a flaky test](https://github.com/opensearch-project/OpenSearch/blob/main/DEVELOPER_GUIDE.md#flaky-tests) unrelated to your change?

org.opensearch.remotestore.RemoteStoreIT.testRemoteTranslogRestore test was flaky due to the bug in #5845. After merge of #6086, rebased the changes, should be fine now.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 3, 2023

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.geo.search.aggregations.bucket.GeoTileGridIT.testGeoShapes

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Feb 3, 2023

Codecov Report

❌ Patch coverage is 42.85714% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.74%. Comparing base (54ce423) to head (96a1678).
⚠️ Report is 4244 commits behind head on main.

Files with missing lines Patch % Lines
...a/org/opensearch/test/OpenSearchIntegTestCase.java 0.00% 3 Missing ⚠️
...uster/routing/allocation/IndexMetadataUpdater.java 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #6067      +/-   ##
============================================
- Coverage     70.90%   70.74%   -0.16%     
+ Complexity    58904    58799     -105     
============================================
  Files          4778     4778              
  Lines        281149   281150       +1     
  Branches      40622    40622              
============================================
- Hits         199346   198906     -440     
- Misses        65480    65881     +401     
- Partials      16323    16363      +40     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gbbafna gbbafna changed the title [Remote Store] Add integ tests for restore flow from remote store [Remote Store] Get SeqNo from Segment Info and integ tests for restore flow Feb 3, 2023
@gbbafna gbbafna merged commit f01d3d2 into opensearch-project:main Feb 3, 2023
@gbbafna gbbafna added the backport 2.x Backport to 2.x branch label Feb 3, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request Feb 3, 2023
…e flow (#6067)

*  Get SeqNo from Segment Info and add integ tests for restore flow from remote store
Signed-off-by: Sachin Kale <kalsac@amazon.com>
(cherry picked from commit f01d3d2)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
kotwanikunal pushed a commit that referenced this pull request Feb 3, 2023
…e flow (#6067)

*  Get SeqNo from Segment Info and add integ tests for restore flow from remote store
Signed-off-by: Sachin Kale <kalsac@amazon.com>
(cherry picked from commit f01d3d2)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
kotwanikunal pushed a commit that referenced this pull request Feb 3, 2023
…e flow (#6067) (#6171)

*  Get SeqNo from Segment Info and add integ tests for restore flow from remote store
Signed-off-by: Sachin Kale <kalsac@amazon.com>
(cherry picked from commit f01d3d2)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
mch2 pushed a commit to mch2/OpenSearch that referenced this pull request Mar 4, 2023
…e flow (opensearch-project#6067)

*  Get SeqNo from Segment Info and add integ tests for restore flow from remote store
Signed-off-by: Sachin Kale <kalsac@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 2.x Backport to 2.x branch skip-changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants